home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98c.txt / 000071_icon-group-sender _Tue Nov 3 12:33:17 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id MAA19791
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 3 Nov 1998 12:33:16 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA13162; Tue, 3 Nov 1998 12:32:39 -0700
  7. Date: Tue, 3 Nov 1998 09:31:22 -0700
  8. From: Gregg Townsend <gmt@optima.CS.Arizona.EDU>
  9. Message-Id: <9811031631.AA03653@hawk.CS.Arizona.EDU>
  10. To: icon-group@optima.CS.Arizona.EDU, valliant@hawaii.edu
  11. Subject: Re:  How to read integers and others
  12. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  13. Status: RO
  14.  
  15.     From: Robert Valliant <valliant@hawaii.edu>
  16.     
  17.     I have an information retrieval program written in "c" that I would
  18.     like to convert to a web application.
  19.     The indexing portion of the application generates an inverted file of
  20.     the format:
  21.         word   32-bit integer
  22.         ...
  23.     
  24. To read binary data in Icon:
  25.     -- open the file in "untranslated" mode
  26.     -- read multiples of 4 bytes using reads()
  27.     -- convert characters to binary using ord(), and pack together
  28.     -- or convert using pack/unpack from the Icon Program Library:
  29.        http://www.cs.arizona.edu/icon/library/procs/binary.htm
  30.  
  31.    ---------------------------------------------------------------------------
  32.    Gregg Townsend              Gould-Simpson Building   gmt@cs.arizona.edu
  33.    Staff Scientist             1040 E. 4th St.          32 13 45N  110 57 16W
  34.    Dept. of Computer Science   PO Box 210077            tel: +1 520 621 4325
  35.    The University of Arizona   Tucson, AZ  85721-0077   fax: +1 520 621 4246
  36.     
  37.